import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
	path:'/',
	name:'登录',
	component: () => import('../views/Info.vue')
  },
  {
  	path:'/home',
  	name:'首页',
  	component: () => import('../views/Home/Home.vue'),
	children:[
		{
			path: '/home/manage',
			name: '权限管理',
			component: () => import('../views/Home/Manage/Manage.vue'),
			meta: {
				requireAuth: true
			}
		},
		{
			path: '/home/grade',
			name: '成绩查询',
			component: () => import('../views/Home/Grade/Grade.vue'),
			meta: {
				requireAuth: true
			}
		},
	]
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
